#include <iostream>
#include "vectorfunctions.h"

int main()
{
	int l, b, e;
	int x[100], e1[3]={0,1,2}, e2[3]={3,4,5};
	cout<<"Length of array : ";
	cin>>l;
	cout<<"b = ";
	cin>>b;
	readVector(x, l);
	if(no_in_vector(e1, 3, b) && l%2!=0)
		e=sumofVector(x, l);
	else	
		if(no_in_vector(e2, 3, b) && l%2==0)
			e=prodofVector(x, l);
		else
			e=sumofVector(x, l) + prodofVector(x, l);
	cout<<e<<"\n";
	
return 0;
}
